
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>限流-sentinel · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-sidebar-style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../java高级/JUC.html" />
    
    
    <link rel="prev" href="17.注册中心&配置中心-nacos.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">基础篇</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../java基础/IO流基础.html">
            
                <a href="../java基础/IO流基础.html">
            
                    
                    IO流基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../java基础/集合.html">
            
                <a href="../java基础/集合.html">
            
                    
                    集合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../java基础/异常处理.html">
            
                <a href="../java基础/异常处理.html">
            
                    
                    异常处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../java基础/线程.html">
            
                <a href="../java基础/线程.html">
            
                    
                    线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../java基础/网络编程.html">
            
                <a href="../java基础/网络编程.html">
            
                    
                    网络编程
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">进阶篇</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../java进阶/MySQL.html">
            
                <a href="../java进阶/MySQL.html">
            
                    
                    MySQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../java进阶/Oracle.html">
            
                <a href="../java进阶/Oracle.html">
            
                    
                    Oracle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="../java进阶/Redis.html">
            
                <a href="../java进阶/Redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="../java进阶/Netty.html">
            
                <a href="../java进阶/Netty.html">
            
                    
                    Netty
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="../java进阶/Spring.html">
            
                <a href="../java进阶/Spring.html">
            
                    
                    Spring
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="../java进阶/SpringMVC.html">
            
                <a href="../java进阶/SpringMVC.html">
            
                    
                    SpringMVC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="../java进阶/单元测试.html">
            
                <a href="../java进阶/单元测试.html">
            
                    
                    SpringBoot单元测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="../java进阶/设计模式.html">
            
                <a href="../java进阶/设计模式.html">
            
                    
                    二十三个设计模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.8.1" data-path="../java进阶/工厂模式.html">
            
                <a href="../java进阶/工厂模式.html">
            
                    
                    工厂模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.2" data-path="../java进阶/单例模式.html">
            
                <a href="../java进阶/单例模式.html">
            
                    
                    单例模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.3" data-path="../java进阶/建造者模式.html">
            
                <a href="../java进阶/建造者模式.html">
            
                    
                    建造者模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.4" data-path="../java进阶/原型模式.html">
            
                <a href="../java进阶/原型模式.html">
            
                    
                    原型模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.5" data-path="../java进阶/适配器模式.html">
            
                <a href="../java进阶/适配器模式.html">
            
                    
                    适配器模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.6" data-path="../java进阶/责任链模式.html">
            
                <a href="../java进阶/责任链模式.html">
            
                    
                    责任链模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.7" data-path="../java进阶/桥接模式.html">
            
                <a href="../java进阶/桥接模式.html">
            
                    
                    桥接模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">高级篇</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="1.cloud架构选型.html">
            
                <a href="1.cloud架构选型.html">
            
                    
                    Spring Cloud
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1.1" data-path="2.Provider-支付模块.html">
            
                <a href="2.Provider-支付模块.html">
            
                    
                    Provider-支付模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="3.Consumer-订单模块.html">
            
                <a href="3.Consumer-订单模块.html">
            
                    
                    Consumer-订单模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.3" data-path="4.重构-Common模块.html">
            
                <a href="4.重构-Common模块.html">
            
                    
                    重构-Common模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.4" data-path="5.注册中心-Enreka.html">
            
                <a href="5.注册中心-Enreka.html">
            
                    
                    注册中心-Enreka
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.5" data-path="6.负载均衡-@LoadBalance.html">
            
                <a href="6.负载均衡-@LoadBalance.html">
            
                    
                    负载均衡-@LoadBalance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.6" data-path="7.更换注册中心-Zookeeper.html">
            
                <a href="7.更换注册中心-Zookeeper.html">
            
                    
                    更换注册中心-Zookeeper
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.7" data-path="8.更换注册中心-Consul.html">
            
                <a href="8.更换注册中心-Consul.html">
            
                    
                    更换注册中心-Consul
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.8" data-path="9.负载均衡-Ribbon.html">
            
                <a href="9.负载均衡-Ribbon.html">
            
                    
                    负载均衡-Ribbon
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.9" data-path="10.服务调用-OpenFeign.html">
            
                <a href="10.服务调用-OpenFeign.html">
            
                    
                    服务调用-OpenFeign
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.10" data-path="11.熔断器-Hystrix.html">
            
                <a href="11.熔断器-Hystrix.html">
            
                    
                    熔断器-Hystrix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.11" data-path="12.网关-Gateway.html">
            
                <a href="12.网关-Gateway.html">
            
                    
                    网关-Gateway
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.12" data-path="13.配置中心-Config.html">
            
                <a href="13.配置中心-Config.html">
            
                    
                    配置中心-Config
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.13" data-path="14.消息总线-bus.html">
            
                <a href="14.消息总线-bus.html">
            
                    
                    消息总线-Bus
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.14" data-path="15.消息驱动-stream.html">
            
                <a href="15.消息驱动-stream.html">
            
                    
                    消息驱动-Stream
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.15" data-path="16.链路监控-Sleuth.html">
            
                <a href="16.链路监控-Sleuth.html">
            
                    
                    链路监控-Sleuth
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.16" data-path="17.注册中心&配置中心-nacos.html">
            
                <a href="17.注册中心&配置中心-nacos.html">
            
                    
                    注册中心&配置中心-nacos
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="4.1.17" data-path="18.限流-sentinel.html">
            
                <a href="18.限流-sentinel.html">
            
                    
                    限流-sentinel
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../java高级/JUC.html">
            
                <a href="../java高级/JUC.html">
            
                    
                    神秘的JUC包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../java高级/Docker.html">
            
                <a href="../java高级/Docker.html">
            
                    
                    Docker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="../java高级/布隆过滤器.html">
            
                <a href="../java高级/布隆过滤器.html">
            
                    
                    布隆过滤器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="../java高级/Redission.html">
            
                <a href="../java高级/Redission.html">
            
                    
                    Redission
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="../java高级/MQ.html">
            
                <a href="../java高级/MQ.html">
            
                    
                    消息队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="../java高级/JVM.html">
            
                <a href="../java高级/JVM.html">
            
                    
                    JVM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="../java书籍/《Effective Java》读书笔记.html">
            
                <a href="../java书籍/《Effective Java》读书笔记.html">
            
                    
                    《Effective Java》读书笔记 
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.8.1" data-path="../java书籍/创建和销毁对象.html">
            
                <a href="../java书籍/创建和销毁对象.html">
            
                    
                    创建和销毁对象
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">番外篇</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../java面试/面试题.html">
            
                <a href="../java面试/面试题.html">
            
                    
                    面试题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../番外篇/小程序.html">
            
                <a href="../番外篇/小程序.html">
            
                    
                    微信小程序
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >限流-sentinel</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="1sentinel&#x548C;hystrix&#x5BF9;&#x6BD4;"><a name="1sentinel&#x548C;hystrix&#x5BF9;&#x6BD4;" class="plugin-anchor" href="#1sentinel&#x548C;hystrix&#x5BF9;&#x6BD4;"><i class="fa fa-link" aria-hidden="true"></i></a>1.Sentinel&#x548C;Hystrix&#x5BF9;&#x6BD4;</h2>
<p><a href="https://developer.aliyun.com/article/633786" target="_blank">Sentinel&#x548C;Hystrix&#x5BF9;&#x6BD4;</a>  &#xFF5C;  <a href="https://github.com/alibaba/Sentinel/wiki/&#x4ECB;&#x7ECD;" target="_blank">&#x5B98;&#x65B9;github&#x4ECB;&#x7ECD;</a></p>
<blockquote>
<p>&#x968F;&#x7740;&#x5FAE;&#x670D;&#x52A1;&#x7684;&#x6D41;&#x884C;&#xFF0C;&#x670D;&#x52A1;&#x548C;&#x670D;&#x52A1;&#x4E4B;&#x95F4;&#x7684;&#x7A33;&#x5B9A;&#x6027;&#x53D8;&#x5F97;&#x8D8A;&#x6765;&#x8D8A;&#x91CD;&#x8981;&#x3002;<a href="https://sentinelguard.io/" target="_blank">Sentinel</a> &#x662F;&#x9762;&#x5411;&#x5206;&#x5E03;&#x5F0F;&#x3001;&#x591A;&#x8BED;&#x8A00;&#x5F02;&#x6784;&#x5316;&#x670D;&#x52A1;&#x67B6;&#x6784;&#x7684;&#x6D41;&#x91CF;&#x6CBB;&#x7406;&#x7EC4;&#x4EF6;&#xFF0C;&#x4E3B;&#x8981;&#x4EE5;&#x6D41;&#x91CF;&#x4E3A;&#x5207;&#x5165;&#x70B9;&#xFF0C;&#x4ECE;&#x6D41;&#x91CF;&#x8DEF;&#x7531;&#x3001;&#x6D41;&#x91CF;&#x63A7;&#x5236;&#x3001;&#x6D41;&#x91CF;&#x6574;&#x5F62;&#x3001;&#x7194;&#x65AD;&#x964D;&#x7EA7;&#x3001;&#x7CFB;&#x7EDF;&#x81EA;&#x9002;&#x5E94;&#x8FC7;&#x8F7D;&#x4FDD;&#x62A4;&#x3001;&#x70ED;&#x70B9;&#x6D41;&#x91CF;&#x9632;&#x62A4;&#x7B49;&#x591A;&#x4E2A;&#x7EF4;&#x5EA6;&#x6765;&#x5E2E;&#x52A9;&#x5F00;&#x53D1;&#x8005;&#x4FDD;&#x969C;&#x5FAE;&#x670D;&#x52A1;&#x7684;&#x7A33;&#x5B9A;&#x6027;&#x3002;</p>
</blockquote>
<p>&#x5B98;&#x65B9;&#x7684;&#x7279;&#x6027;&#x56FE;&#xFF1A;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h4ranev1wtj214u0j2ju7.jpg" alt=""></p>
<h2 id="2-&#x5982;&#x4F55;&#x5B89;&#x88C5;"><a name="2-&#x5982;&#x4F55;&#x5B89;&#x88C5;" class="plugin-anchor" href="#2-&#x5982;&#x4F55;&#x5B89;&#x88C5;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x5982;&#x4F55;&#x5B89;&#x88C5;</h2>
<p><a href="https://github.com/alibaba/Sentinel/releases" target="_blank">&#x4E0B;&#x8F7D;&#x5730;&#x5740;</a></p>
<p>Sentinel &#x5206;&#x4E3A;&#x4E24;&#x4E2A;&#x90E8;&#x5206;&#xFF1A;</p>
<ul>
<li>&#x6838;&#x5FC3;&#x5E93;&#xFF08;Java&#x5BA2;&#x6237;&#x7AEF;&#xFF09;&#xFF0C;&#x4E0D;&#x4F9D;&#x8D56;&#x4EFB;&#x4F55;&#x6846;&#x67B6;/&#x5E93;&#xFF0C;&#x80FD;&#x591F;&#x8FD0;&#x884C;&#x4E8E;&#x6240;&#x6709;&#x7684;java&#x8FD0;&#x884C;&#x73AF;&#x5883;&#xFF0C;&#x540C;&#x65F6;&#x5BF9;cloud&#x548C;dubbo&#x7B49;&#x6846;&#x67B6;&#x6709;&#x5F88;&#x597D;&#x7684;&#x652F;&#x6301;</li>
<li>&#x63A7;&#x5236;&#x53F0;&#xFF08;Dashboard&#xFF09;&#xFF0C;&#x57FA;&#x4E8E;Spring boot&#x5F00;&#x53D1;&#xFF0C;&#x6253;&#x5305;&#x540E;&#x76F4;&#x63A5;&#x8FD0;&#x884C;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x989D;&#x5916;&#x7684;Tomcat&#x7B49;&#x5BB9;&#x5668;</li>
</ul>
<p>&#x4E0B;&#x8F7D;&#x5B8C;jar&#x5305;&#x540E;&#xFF0C;&#x6267;&#x884C;&#x547D;&#x4EE4; <code>java -jar jar&#x5305;&#x5730;&#x5740;</code> &#x542F;&#x52A8;&#x63A7;&#x5236;&#x53F0;&#x670D;&#x52A1;&#x3002;</p>
<p>&#x542F;&#x52A8;&#x5B8C;&#x6210;&#x540E;&#x8BBF;&#x95EE;&#xFF1A;<code>http://localhost:8080</code> &#x8D26;&#x53F7;&#x5BC6;&#x7801;&#x4E3A;&#xFF1A;<code>sentinel/sentinel</code></p>
<h2 id="3&#x7B80;&#x5355;&#x63A5;&#x5165;&#x76D1;&#x63A7;"><a name="3&#x7B80;&#x5355;&#x63A5;&#x5165;&#x76D1;&#x63A7;" class="plugin-anchor" href="#3&#x7B80;&#x5355;&#x63A5;&#x5165;&#x76D1;&#x63A7;"><i class="fa fa-link" aria-hidden="true"></i></a>3.&#x7B80;&#x5355;&#x63A5;&#x5165;&#x76D1;&#x63A7;</h2>
<blockquote>
<p> &#x4FEE;&#x6539;order&#x6D88;&#x8D39;&#x8005;&#x9879;&#x76EE; &#x26A0;&#xFE0F; &#x8FD9;&#x91CC;&#x53EA;&#x8BB2;&#x7B80;&#x5355;&#x7684;&#x63A5;&#x5165;&#x76D1;&#x63A7;</p>
</blockquote>
<p>Pom.xml  &#x53BB;&#x6389;&#x4E86; hystrix&#x76F8;&#x5173;&#x7684;&#x4F9D;&#x8D56;</p>
<pre><code class="lang-xml"><span class="php"><span class="hljs-meta">&lt;?</span>xml version=<span class="hljs-string">&quot;1.0&quot;</span> encoding=<span class="hljs-string">&quot;UTF-8&quot;</span><span class="hljs-meta">?&gt;</span></span>
<span class="hljs-tag">&lt;<span class="hljs-name">project</span> <span class="hljs-attr">xmlns</span>=<span class="hljs-string">&quot;http://maven.apache.org/POM/4.0.0&quot;</span>
         <span class="hljs-attr">xmlns:xsi</span>=<span class="hljs-string">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
         <span class="hljs-attr">xsi:schemaLocation</span>=<span class="hljs-string">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">parent</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>bigdata<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.bulangxiongdi.springcloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.0-SNAPSHOT<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">parent</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">modelVersion</span>&gt;</span>4.0.0<span class="hljs-tag">&lt;/<span class="hljs-name">modelVersion</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>eureka-consumer-order<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>


    <span class="hljs-tag">&lt;<span class="hljs-name">dependencies</span>&gt;</span>

        <span class="hljs-comment">&lt;!--&#x5305;&#x542B;zipkin&#x548C;sleuth--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-zipkin<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

        <span class="hljs-comment">&lt;!--stream RabbitMQ--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-stream-rabbit<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

        <span class="hljs-comment">&lt;!-- OpenFeign &#x4F9D;&#x8D56; --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-openfeign<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

        <span class="hljs-comment">&lt;!--nacos--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.alibaba.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-discovery<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.alibaba.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-nacos-config<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
        <span class="hljs-comment">&lt;!-- &#x6301;&#x4E45;&#x5316; &#x2705;--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.alibaba.csp<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>sentinel-datasource-nacos<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
        <span class="hljs-comment">&lt;!--sentinel &#x2705;--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.alibaba.cloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-cloud-starter-alibaba-sentinel<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

        <span class="hljs-comment">&lt;!--web--&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-web<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-actuator<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-devtools<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">scope</span>&gt;</span>runtime<span class="hljs-tag">&lt;/<span class="hljs-name">scope</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">optional</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-name">optional</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.projectlombok<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>lombok<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">optional</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-name">optional</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.springframework.boot<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>spring-boot-starter-test<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">scope</span>&gt;</span>test<span class="hljs-tag">&lt;/<span class="hljs-name">scope</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

        <span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.springcloud<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>api-common<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>${project.version}<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span>

    <span class="hljs-tag">&lt;/<span class="hljs-name">dependencies</span>&gt;</span>


<span class="hljs-tag">&lt;/<span class="hljs-name">project</span>&gt;</span>
</code></pre>
<p>bootstrap.yml &#x589E;&#x52A0;sentinel&#x914D;&#x7F6E;</p>
<pre><code class="lang-yml"><span class="hljs-attr">server:</span>
<span class="hljs-attr">  port:</span> <span class="hljs-number">80</span>

<span class="hljs-attr">spring:</span>
<span class="hljs-attr">  application:</span>
<span class="hljs-attr">    name:</span> eureka-consumer-order
<span class="hljs-attr">  rabbitmq:</span>                                                     <span class="hljs-comment"># rabbitMQ&#x76F8;&#x5173;&#x914D;&#x7F6E;</span>
<span class="hljs-attr">    host:</span> ip
<span class="hljs-attr">    port:</span> <span class="hljs-number">5672</span>
<span class="hljs-attr">    username:</span> guest
<span class="hljs-attr">    password:</span> guest
<span class="hljs-attr">  zipkin:</span>                                                       <span class="hljs-comment"># zipkin &#x94FE;&#x8DEF;&#x76D1;&#x63A7;&#x914D;&#x7F6E;</span>
<span class="hljs-attr">    base-url:</span> http://ip:<span class="hljs-number">9411</span>
<span class="hljs-attr">  sleuth:</span>
<span class="hljs-attr">    sampler:</span>
<span class="hljs-attr">      probability:</span> <span class="hljs-number">1</span>                                            <span class="hljs-comment"># &#x91C7;&#x6837;&#x7387; 0&#xFF5E;1 ,1&#x8868;&#x793A;&#x5168;&#x90E8;&#x91C7;&#x96C6;</span>
<span class="hljs-attr">  cloud:</span>
<span class="hljs-attr">    stream:</span>
<span class="hljs-attr">      binders:</span>                                                  <span class="hljs-comment"># &#x6B64;&#x5904;&#x914D;&#x7F6E;&#x8981;&#x7ED1;&#x5B9A;&#x7684;rabbitmq&#x7684;&#x670D;&#x52A1;&#x4FE1;&#x606F;</span>
<span class="hljs-attr">        defaultRabbit:</span>                                          <span class="hljs-comment"># &#x8868;&#x793A;&#x5B9A;&#x4E49;&#x7684;&#x540D;&#x79F0;&#xFF0C;&#x7528;&#x4E8E;&#x4E0E;binding&#x6574;&#x5408;</span>
<span class="hljs-attr">          type:</span> rabbit                                          <span class="hljs-comment"># &#x6D88;&#x606F;&#x7EC4;&#x4EF6;&#x7684;&#x7C7B;&#x578B;&#xFF0C;&#x5982;&#x679C;&#x662F;kafka&#x5C31;&#x5199;kafka</span>
<span class="hljs-attr">      bindings:</span>                                                 <span class="hljs-comment"># &#x670D;&#x52A1;&#x7684;&#x6574;&#x5408;&#x5904;&#x7406;</span>
<span class="hljs-attr">        input:</span>                                                  <span class="hljs-comment"># &#x901A;&#x9053;(channel)&#x7684;&#x540D;&#x79F0;</span>
<span class="hljs-attr">          destination:</span> studyExhange                             <span class="hljs-comment"># &#x8868;&#x793A;&#x8981;&#x4F7F;&#x7528;&#x7684;Exchange&#x540D;&#x79F0;</span>
<span class="hljs-attr">          content-type:</span> application/json                        <span class="hljs-comment"># &#x8BBE;&#x7F6E;&#x6D88;&#x606F;&#x7684;&#x7C7B;&#x578B;&#xFF0C;&#x6587;&#x672C;&#x5219;&#x4E3A; &quot;text/plain&quot;</span>
<span class="hljs-attr">          binder:</span> defaultRabbit                                 <span class="hljs-comment"># &#x98D8;&#x7EA2;&#x4E0D;&#x7528;&#x7BA1;</span>
<span class="hljs-attr">          group:</span> groupA                                         <span class="hljs-comment"># &#x5B9A;&#x4E49;&#x5206;&#x7EC4;&#xFF0C;&#x540C;&#x4E00;&#x4E2A;&#x7EC4;&#x5185;&#x6D88;&#x606F;&#x4F1A;&#x7ADE;&#x4E89;&#x6D88;&#x8D39;</span>
<span class="hljs-attr">    nacos:</span>                                                      <span class="hljs-comment"># nacos &#x914D;&#x7F6E;</span>
<span class="hljs-attr">      discovery:</span>
<span class="hljs-attr">        server-addr:</span> ip:<span class="hljs-number">8848</span>
<span class="hljs-attr">      config:</span>
<span class="hljs-attr">        server-addr:</span> ip:<span class="hljs-number">8848</span>
<span class="hljs-attr">        file-extension:</span> yaml                                    <span class="hljs-comment"># &#x6307;&#x5B9A;yaml&#x683C;&#x5F0F;</span>
<span class="hljs-attr">    sentinel:</span>                                                   <span class="hljs-comment"># &#x2705;</span>
<span class="hljs-attr">      transport:</span>
<span class="hljs-attr">        dashboard:</span> ip:port                                      <span class="hljs-comment"># &#x4EEA;&#x8868;&#x76D8;&#x7684;ip</span>
<span class="hljs-attr">        port:</span> <span class="hljs-number">8719</span>                                              <span class="hljs-comment"># &#x9ED8;&#x8BA4;8719&#xFF0C;&#x5982;&#x679C;&#x88AB;&#x5360;&#x7528;&#x5219;&#x81EA;&#x52A8;+1&#x5C1D;&#x8BD5;&#xFF0C;&#x76F4;&#x81F3;&#x627E;&#x5230;&#x672A;&#x88AB;&#x5360;&#x7528;&#x7684;&#x7AEF;&#x53E3;</span>

<span class="hljs-comment"># &#x66B4;&#x9732;&#x76D1;&#x63A7;&#x7AEF;&#x70B9;</span>
<span class="hljs-attr">management:</span>
<span class="hljs-attr">  endpoints:</span>
<span class="hljs-attr">    web:</span>
<span class="hljs-attr">      exposure:</span>
<span class="hljs-attr">        include:</span> <span class="hljs-string">&quot;*&quot;</span>
</code></pre>
<p>&#x542F;&#x52A8;&#x7C7B; &#x53BB;&#x6389;@EnableCircuitBreaker</p>
<pre><code class="lang-java"><span class="hljs-meta">@SpringBootApplication</span>
<span class="hljs-meta">@EnableFeignClients</span>
<span class="hljs-meta">@EnableCircuitBreaker</span>
<span class="hljs-meta">@EnableDiscoveryClient</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">OrderMainApplication</span></span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        SpringApplication.run(OrderMainApplication.class,args);
    }
}
</code></pre>
<p>&#x4E1A;&#x52A1;&#x7C7B;  &#x53BB;&#x6389;&#x548C;Hystrix&#x76F8;&#x5173;&#x7684;&#x6CE8;&#x89E3;</p>
<pre><code class="lang-java"><span class="hljs-meta">@RestController</span>
<span class="hljs-meta">@RequestMapping</span>(<span class="hljs-string">&quot;/order&quot;</span>)
<span class="hljs-meta">@Slf</span>4j
<span class="hljs-meta">@RefreshScope</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">OrderController</span> </span>{

    <span class="hljs-meta">@Value</span>(<span class="hljs-string">&quot;${config.info:1234}&quot;</span>)
    <span class="hljs-keyword">private</span> String info;

    <span class="hljs-meta">@Autowired</span>
    <span class="hljs-keyword">private</span> IRemotePaymentService remotePaymentService;

    <span class="hljs-meta">@GetMapping</span>(<span class="hljs-string">&quot;/getPaymentById/{id}&quot;</span>)
    <span class="hljs-function"><span class="hljs-keyword">public</span> CommonResult&lt;Payment&gt; <span class="hljs-title">get</span><span class="hljs-params">(@PathVariable(<span class="hljs-string">&quot;id&quot;</span>)</span> Long id)</span>{
        CommonResult&lt;Payment&gt; paymentById = remotePaymentService.getPayment(id);
        <span class="hljs-keyword">return</span> paymentById;
    }


    <span class="hljs-meta">@GetMapping</span>(<span class="hljs-string">&quot;/getString&quot;</span>)
    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">get</span><span class="hljs-params">()</span></span>{
        <span class="hljs-keyword">int</span> i = <span class="hljs-number">1</span>/<span class="hljs-number">0</span>;
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;&quot;</span>;
    }

    <span class="hljs-comment">// &#x515C;&#x5E95;&#x65B9;&#x6CD5;&#xFF01;</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> CommonResult&lt;Payment&gt; <span class="hljs-title">testHystrixTimoutFallback</span><span class="hljs-params">(Long id)</span> <span class="hljs-keyword">throws</span> InterruptedException </span>{
         log.info(id + <span class="hljs-string">&quot;&#x964D;&#x7EA7;&#x670D;&#x52A1;&#x65B9;&#x6CD5;&#x6267;&#x884C;!&quot;</span>);
        <span class="hljs-keyword">return</span> <span class="hljs-keyword">null</span>;
    }

    <span class="hljs-comment">// &#x5168;&#x5C40;&#x515C;&#x5E95;&#x65B9;&#x6CD5;&#xFF01;</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">testHystrixGlobalFallback</span><span class="hljs-params">()</span> <span class="hljs-keyword">throws</span> InterruptedException </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;&#x5168;&#x5C40;&#x7684;&#x964D;&#x7EA7;&#x670D;&#x52A1;&#x65B9;&#x6CD5;&#x6267;&#x884C;!&quot;</span>;

    }

    <span class="hljs-comment">//&#x7194;&#x65AD;</span>
    <span class="hljs-meta">@GetMapping</span>(<span class="hljs-string">&quot;/circuit/getPaymentById/{id}&quot;</span>)
    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getCircuitBreaker</span><span class="hljs-params">(@PathVariable(<span class="hljs-string">&quot;id&quot;</span>)</span> Long id) <span class="hljs-keyword">throws</span> Exception</span>{

        <span class="hljs-keyword">if</span>(id&lt;<span class="hljs-number">0</span>){
            <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Exception(<span class="hljs-string">&quot;id&#x4E0D;&#x80FD;&#x4E3A;&#x8D1F;&#x6570;!&quot;</span>);
        }
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;&#x8C03;&#x7528;&#x6210;&#x529F;&#x6D41;&#x6C34;&#x53F7;&quot;</span>+ IdUtil.simpleUUID();
    }

    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">circuitBreakerFallback</span><span class="hljs-params">(@PathVariable(<span class="hljs-string">&quot;id&quot;</span>)</span> Long id)</span>{

        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;id &#x4E0D;&#x80FD;&#x4E3A;&#x8D1F;&#x6570;&#xFF0C;&#x8BF7;&#x7A0D;&#x540E;&#x518D;&#x8BD5; =&gt; &quot;</span>+id;
    }

    <span class="hljs-comment">//&#x914D;&#x7F6E;&#x4E2D;&#x5FC3;</span>
    <span class="hljs-meta">@GetMapping</span>(<span class="hljs-string">&quot;/getConfig&quot;</span>)
    <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getConfig</span><span class="hljs-params">()</span></span>{
        <span class="hljs-keyword">return</span> info;
    }

}
</code></pre>
<p>&#x542F;&#x52A8;order&#x9879;&#x76EE;&#xFF0C;&#x542F;&#x52A8;nacos&#x548C;sentinel dashboard</p>
<p>sentinel &#x91C7;&#x7528;&#x7684;&#x662F;&#x61D2;&#x52A0;&#x8F7D;&#x7684;&#x6A21;&#x5F0F;&#xFF0C;&#x6240;&#x4EE5;&#x5F53;&#x4F60;&#x542F;&#x52A8;&#x597D;&#x4EE5;&#x540E;&#x8BBF;&#x95EE;sentinel&#x4EEA;&#x8868;&#x76D8;&#x7F51;&#x9875;&#x662F;&#x4EC0;&#x4E48;&#x90FD;&#x6CA1;&#x6709;&#x7684;&#xFF0C;&#x9700;&#x8981;&#x4F60;&#x8BBF;&#x95EE;&#x4E00;&#x6B21;&#x9879;&#x76EE;&#x7684;&#x63A5;&#x53E3;&#x624D;&#x4F1A;&#x53D1;&#x73B0;&#x4F60;&#x7684;&#x5FAE;&#x670D;&#x52A1;&#x3002;(&#x8BF7;&#x5FFD;&#x7565;&#x6211;&#x7684;0/1&#xFF0C;&#x56E0;&#x4E3A;&#x6211;&#x505C;&#x4E86;&#x9879;&#x76EE;&#x622A;&#x7684;&#x56FE;)</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h4urfq9bdhj218c0mpdh9.jpg" alt="s"></p>
<h2 id="4&#x6D41;&#x63A7;&#x89C4;&#x5219;"><a name="4&#x6D41;&#x63A7;&#x89C4;&#x5219;" class="plugin-anchor" href="#4&#x6D41;&#x63A7;&#x89C4;&#x5219;"><i class="fa fa-link" aria-hidden="true"></i></a>4.&#x6D41;&#x63A7;&#x89C4;&#x5219;</h2>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h57873t2w0j20ji0c60td.jpg" alt=""></p>
<ul>
<li>&#x8D44;&#x6E90;&#x540D;&#xFF1A;&#x552F;&#x4E00;&#x540D;&#x79F0;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x8BF7;&#x6C42;&#x8DEF;&#x5F84;</li>
<li>&#x9488;&#x5BF9;&#x6765;&#x6E90;&#xFF1A;Sentinel&#x53EF;&#x4EE5;&#x9488;&#x5BF9;&#x8C03;&#x7528;&#x8005;&#x8FDB;&#x884C;&#x9650;&#x6D41;&#xFF0C;&#x586B;&#x5199;&#x5FAE;&#x670D;&#x52A1;&#x540D;&#xFF0C;&#x6307;&#x5B9A;&#x5BF9;&#x54EA;&#x4E2A;&#x670D;&#x52A1;&#x8FDB;&#x884C;&#x9650;&#x6D41;&#xFF08;&#x9ED8;&#x8BA4;&#x662F;&#x5168;&#x90E8;&#x9650;&#x6D41;&#xFF09;</li>
<li>&#x9608;&#x503C;&#x7C7B;&#x578B;/&#x5355;&#x673A;&#x9608;&#x503C;&#xFF1A;<ul>
<li>QPS&#xFF08;&#x6BCF;&#x79D2;&#x8BF7;&#x6C42;&#x6570;&#x91CF;&#xFF09;&#xFF1A;&#x5F53;&#x8C03;&#x7528;&#x8BE5;&#x63A5;&#x53E3;&#x7684;QPS&#x8FBE;&#x5230;&#x4E86;&#x9608;&#x503C;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x8FDB;&#x884C;&#x9650;&#x6D41;&#xFF1A;</li>
<li>&#x7EBF;&#x7A0B;&#x6570;&#xFF1A;&#x5F53;&#x8C03;&#x7528;&#x8BE5;&#x63A5;&#x53E3;&#x7684;&#x7EBF;&#x7A0B;&#x6570;&#x8FBE;&#x5230;&#x9608;&#x503C;&#x65F6;&#xFF0C;&#x8FDB;&#x884C;&#x9650;&#x6D41;</li>
</ul>
</li>
<li>&#x662F;&#x5426;&#x96C6;&#x7FA4;&#xFF1A;&#x4E0D;&#x9700;&#x8981;&#x96C6;&#x7FA4;</li>
<li>&#x6D41;&#x63A7;&#x6A21;&#x5F0F;&#xFF1A;<ul>
<li>&#x76F4;&#x63A5;&#xFF1A;&#x63A5;&#x53E3;&#x8FBE;&#x5230;&#x9650;&#x6D41;&#x6761;&#x4EF6;&#x65F6;&#xFF0C;&#x76F4;&#x63A5;&#x9650;&#x6D41;</li>
<li>&#x5173;&#x8054;&#xFF1A;&#x5F53;&#x5173;&#x8054;&#x7684;&#x8D44;&#x6E90;&#x8FBE;&#x5230;&#x9608;&#x503C;&#x65F6;&#xFF0C;&#x5C31;&#x9650;&#x6D41;&#x81EA;&#x5DF1;</li>
<li>&#x94FE;&#x8DEF;&#xFF1A;&#x76F4;&#x8BB0;&#x5F55;&#x6307;&#x5B9A;&#x94FE;&#x8DEF;&#x4E0A;&#x7684;&#x6D41;&#x91CF;&#xFF08;&#x6307;&#x5B9A;&#x8D44;&#x6E90;&#x4ECE;&#x5165;&#x53E3;&#x8D44;&#x6E90;&#x8FDB;&#x6765;&#x7684;&#x6D41;&#x91CF;&#xFF0C;&#x5982;&#x679C;&#x8FBE;&#x5230;&#x9608;&#x503C;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x9650;&#x6D41;&#xFF09;[api&#x7EA7;&#x522B;&#x7684;&#x9488;&#x5BF9;&#x6765;&#x6E90;]</li>
</ul>
</li>
<li>&#x6D41;&#x63A7;&#x6548;&#x679C;&#xFF1A;<ul>
<li>&#x5FEB;&#x901F;&#x5931;&#x8D25;&#xFF1A;&#x76F4;&#x63A5;&#x5931;&#x8D25;</li>
<li>Warm Up&#xFF08;&#x9884;&#x70ED;&#xFF09;&#xFF1A;&#x5373;&#x8BF7;&#x6C42;QPS&#x4ECE;threshold/3&#x5F00;&#x59CB;&#xFF0C;&#x7ECF;&#x8FC7;&#x9884;&#x70ED;&#x65F6;&#x5E38;&#x9010;&#x6E10;&#x5347;&#x81F3;&#x8BBE;&#x5B9A;&#x7684;QPS&#x9608;&#x503C;&#xFF08;&#x9632;&#x6B62;&#x7A81;&#x7136;&#x7684;&#x6D41;&#x91CF;&#x6FC0;&#x589E;&#xFF09;</li>
<li>&#x6392;&#x961F;&#x7B49;&#x5F85;</li>
</ul>
</li>
</ul>
<h3 id="warm-up-&#x9884;&#x70ED;"><a name="warm-up-&#x9884;&#x70ED;" class="plugin-anchor" href="#warm-up-&#x9884;&#x70ED;"><i class="fa fa-link" aria-hidden="true"></i></a>Warm Up &#x9884;&#x70ED;</h3>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h578c2b2lvj20jw0cuwf9.jpg" alt=""></p>
<p>&#x6839;&#x636E;codeFactor&#xFF08;&#x51B7;&#x52A0;&#x8F7D;&#x56E0;&#x5B50;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;3&#xFF09;&#x7684;&#x503C;&#xFF0C;&#x5373;&#x8BF7;&#x6C42; QPS &#x4ECE; threshold / 3 &#x5F00;&#x59CB;&#xFF0C;&#x7ECF;&#x9884;&#x70ED;&#x65F6;&#x957F;&#x9010;&#x6E10;&#x5347;&#x81F3;&#x8BBE;&#x5B9A;&#x7684; QPS &#x9608;&#x503C; ,&#x56E0;&#x6B64;&#x4E0A;&#x56FE;&#x7684;&#x914D;&#x7F6E;&#x5C31;&#x662F;&#x7CFB;&#x7EDF;&#x521D;&#x59CB;&#x5316;&#x7684;&#x9ED8;&#x8BA4;&#x9608;&#x503C;&#x4E3A;10 / 3&#xFF0C;&#x5373;&#x4E3A;3&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x521A;&#x5F00;&#x59CB;&#x7684;&#x65F6;&#x5019;&#x9608;&#x503C;&#x53EA;&#x6709;3&#xFF0C;&#x5F53;&#x7ECF;&#x8FC7;5s&#x540E;&#xFF0C;&#x9608;&#x503C;&#x624D;&#x6162;&#x6162;&#x63D0;&#x9AD8;&#x5230;10&#xFF1B;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#x4E3B;&#x8981;&#x662F;&#x4E3A;&#x4E86;&#x4FDD;&#x62A4;&#x7CFB;&#x7EDF;&#xFF0C;&#x4F8B;&#x5982;&#x5728;&#x79D2;&#x6740;&#x7CFB;&#x7EDF;&#x7684;&#x5F00;&#x542F;&#x77AC;&#x95F4;&#xFF0C;&#x4F1A;&#x6709;&#x5F88;&#x591A;&#x6D41;&#x91CF;&#x4E0A;&#x6765;&#xFF0C;&#x5F88;&#x53EF;&#x80FD;&#x4F1A;&#x628A;&#x7CFB;&#x7EDF;&#x6253;&#x6302;&#xFF0C;&#x9884;&#x70ED;&#x65B9;&#x5F0F;&#x5C31;&#x662F;&#x4E3A;&#x4E86;&#x4FDD;&#x62A4;&#x7CFB;&#x7EDF;&#xFF0C;&#x53EF;&#x4EE5;&#x6162;&#x6162;&#x7684;&#x628A;&#x6D41;&#x91CF;&#x653E;&#x8FDB;&#x6765;&#xFF0C;&#x6162;&#x6162;&#x7684;&#x628A;&#x9608;&#x503C;&#x589E;&#x957F;&#x5230;&#x8BBE;&#x5B9A;&#x503C;&#x3002;</p>
<h2 id="5&#x964D;&#x7EA7;&#xFF08;180&#x7248;&#x672C;&#x53CA;&#x4EE5;&#x540E;&#xFF09;"><a name="5&#x964D;&#x7EA7;&#xFF08;180&#x7248;&#x672C;&#x53CA;&#x4EE5;&#x540E;&#xFF09;" class="plugin-anchor" href="#5&#x964D;&#x7EA7;&#xFF08;180&#x7248;&#x672C;&#x53CA;&#x4EE5;&#x540E;&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>5.&#x964D;&#x7EA7;&#xFF08;1.8.0&#x7248;&#x672C;&#x53CA;&#x4EE5;&#x540E;&#xFF09;</h2>
<p>Sentinel&#x5728;1.8.0&#x7248;&#x672C;&#x5BF9;&#x7194;&#x65AD;&#x964D;&#x7EA7;&#x505A;&#x4E86;&#x5927;&#x7684;&#x8C03;&#x6574;&#xFF0C;&#x53EF;&#x4EE5;&#x5B9A;&#x4E49;&#x4EFB;&#x610F;&#x65F6;&#x957F;&#x7684;&#x7194;&#x65AD;&#x65F6;&#x95F4;&#xFF0C;&#x5F15;&#x5165;&#x4E86;&#x534A;&#x5F00;&#x542F;&#x6062;&#x590D;&#x652F;&#x6301;&#x3002;&#x4E0B;&#x9762;&#x68B3;&#x7406;&#x4E0B;&#x76F8;&#x5173;&#x7279;&#x6027;&#x3002;</p>
<ul>
<li><p>&#x7194;&#x65AD;&#x72B6;&#x6001;</p>
<ul>
<li>OPEN&#xFF1A;&#x8868;&#x793A;&#x7194;&#x65AD;&#x5F00;&#x542F;&#xFF0C;&#x62D2;&#x7EDD;&#x6240;&#x6709;&#x7684;&#x8BF7;&#x6C42;</li>
<li>HALF_OPEN&#xFF1A;&#x63A2;&#x6D4B;&#x6062;&#x590D;&#x72B6;&#x6001;&#xFF0C;&#x5982;&#x679C;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x4E00;&#x4E2A;&#x8BF7;&#x6C42;&#x987A;&#x5229;&#x901A;&#x8FC7;&#x5219;&#x7ED3;&#x675F;&#x7194;&#x65AD;&#xFF0C;&#x5426;&#x5219;&#x7EE7;&#x7EED;&#x7194;&#x65AD;&#xFF1B;&#x3010;&#x5F53;&#x7194;&#x65AD;&#x8FC7;&#x4E86;&#x5B9A;&#x4E49;&#x7684;&#x7194;&#x65AD;&#x65F6;&#x957F;&#xFF0C;&#x72B6;&#x6001;&#x7531;&#x7194;&#x65AD;&#xFF08;OPEN&#xFF09;&#x53D8;&#x4E3A;&#x63A2;&#x6D4B;&#xFF08;HALFOPEN&#xFF09;&#x3011;</li>
<li>CLOSED&#xFF1A;&#x8868;&#x793A;&#x7194;&#x65AD;&#x5173;&#x95ED;&#xFF0C;&#x8BF7;&#x6C42;&#x987A;&#x5229;&#x901A;&#x8FC7;&#x3002;</li>
</ul>
</li>
<li><p>&#x964D;&#x7EA7;&#x89C4;&#x5219;&#xFF1A;</p>
<ul>
<li>&#x6162;&#x8C03;&#x7528;&#x6BD4;&#x4F8B; (<code>SLOW_REQUEST_RATIO</code>)&#xFF1A;&#x9009;&#x62E9;&#x4EE5;&#x6162;&#x8C03;&#x7528;&#x6BD4;&#x4F8B;&#x4F5C;&#x4E3A;&#x9608;&#x503C;&#xFF0C;&#x9700;&#x8981;&#x8BBE;&#x7F6E;&#x5141;&#x8BB8;&#x7684;&#x6162;&#x8C03;&#x7528; RT&#xFF08;&#x5373;&#x6700;&#x5927;&#x7684;&#x54CD;&#x5E94;&#x65F6;&#x95F4;&#xFF09;&#xFF0C;&#x8BF7;&#x6C42;&#x7684;&#x54CD;&#x5E94;&#x65F6;&#x95F4;&#x5927;&#x4E8E;&#x8BE5;&#x503C;&#x5219;&#x7EDF;&#x8BA1;&#x4E3A;<strong>&#x6162;&#x8C03;&#x7528;</strong>&#x3002;&#x5F53;&#x5355;&#x4F4D;&#x7EDF;&#x8BA1;&#x65F6;&#x957F;&#xFF08;<code>statIntervalMs</code>&#xFF09;&#x5185;&#x8BF7;&#x6C42;&#x6570;&#x76EE;&#x5927;&#x4E8E;&#x8BBE;&#x7F6E;&#x7684;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;&#x76EE;&#xFF0C;&#x5E76;&#x4E14;&#x6162;&#x8C03;&#x7528;&#x7684;&#x6BD4;&#x4F8B;&#x5927;&#x4E8E;&#x9608;&#x503C;&#xFF0C;&#x5219;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x7194;&#x65AD;&#x65F6;&#x957F;&#x5185;&#x8BF7;&#x6C42;&#x4F1A;&#x81EA;&#x52A8;&#x88AB;&#x7194;&#x65AD;&#x3002;&#x7ECF;&#x8FC7;&#x7194;&#x65AD;&#x65F6;&#x957F;&#x540E;&#x7194;&#x65AD;&#x5668;&#x4F1A;&#x8FDB;&#x5165;&#x63A2;&#x6D4B;&#x6062;&#x590D;&#x72B6;&#x6001;&#xFF08;HALF-OPEN &#x72B6;&#x6001;&#xFF09;&#xFF0C;&#x82E5;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x4E00;&#x4E2A;&#x8BF7;&#x6C42;&#x54CD;&#x5E94;&#x65F6;&#x95F4;&#x5C0F;&#x4E8E;&#x8BBE;&#x7F6E;&#x7684;&#x6162;&#x8C03;&#x7528; RT &#x5219;&#x7ED3;&#x675F;&#x7194;&#x65AD;&#xFF0C;&#x82E5;&#x5927;&#x4E8E;&#x8BBE;&#x7F6E;&#x7684;&#x6162;&#x8C03;&#x7528; RT &#x5219;&#x4F1A;&#x518D;&#x6B21;&#x88AB;&#x7194;&#x65AD;&#x3002;</li>
<li>&#x5F02;&#x5E38;&#x6BD4;&#x4F8B; (<code>ERROR_RATIO</code>)&#xFF1A;&#x5F53;&#x5355;&#x4F4D;&#x7EDF;&#x8BA1;&#x65F6;&#x957F;&#xFF08;<code>statIntervalMs</code>&#xFF09;&#x5185;&#x8BF7;&#x6C42;&#x6570;&#x76EE;&#x5927;&#x4E8E;&#x8BBE;&#x7F6E;&#x7684;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;&#x76EE;&#xFF0C;&#x5E76;&#x4E14;&#x5F02;&#x5E38;&#x7684;&#x6BD4;&#x4F8B;&#x5927;&#x4E8E;&#x9608;&#x503C;&#xFF0C;&#x5219;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x7194;&#x65AD;&#x65F6;&#x957F;&#x5185;&#x8BF7;&#x6C42;&#x4F1A;&#x81EA;&#x52A8;&#x88AB;&#x7194;&#x65AD;&#x3002;&#x7ECF;&#x8FC7;&#x7194;&#x65AD;&#x65F6;&#x957F;&#x540E;&#x7194;&#x65AD;&#x5668;&#x4F1A;&#x8FDB;&#x5165;&#x63A2;&#x6D4B;&#x6062;&#x590D;&#x72B6;&#x6001;&#xFF08;HALF-OPEN &#x72B6;&#x6001;&#xFF09;&#xFF0C;&#x82E5;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x4E00;&#x4E2A;&#x8BF7;&#x6C42;&#x6210;&#x529F;&#x5B8C;&#x6210;&#xFF08;&#x6CA1;&#x6709;&#x9519;&#x8BEF;&#xFF09;&#x5219;&#x7ED3;&#x675F;&#x7194;&#x65AD;&#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x518D;&#x6B21;&#x88AB;&#x7194;&#x65AD;&#x3002;&#x5F02;&#x5E38;&#x6BD4;&#x7387;&#x7684;&#x9608;&#x503C;&#x8303;&#x56F4;&#x662F; <code>[0.0, 1.0]</code>&#xFF0C;&#x4EE3;&#x8868; 0% - 100%&#x3002;</li>
<li>&#x5F02;&#x5E38;&#x6570; (<code>ERROR_COUNT</code>)&#xFF1A;&#x5F53;&#x5355;&#x4F4D;&#x7EDF;&#x8BA1;&#x65F6;&#x957F;&#x5185;&#x7684;&#x5F02;&#x5E38;&#x6570;&#x76EE;&#x8D85;&#x8FC7;&#x9608;&#x503C;&#x4E4B;&#x540E;&#x4F1A;&#x81EA;&#x52A8;&#x8FDB;&#x884C;&#x7194;&#x65AD;&#x3002;&#x7ECF;&#x8FC7;&#x7194;&#x65AD;&#x65F6;&#x957F;&#x540E;&#x7194;&#x65AD;&#x5668;&#x4F1A;&#x8FDB;&#x5165;&#x63A2;&#x6D4B;&#x6062;&#x590D;&#x72B6;&#x6001;&#xFF08;HALF-OPEN &#x72B6;&#x6001;&#xFF09;&#xFF0C;&#x82E5;&#x63A5;&#x4E0B;&#x6765;&#x7684;&#x4E00;&#x4E2A;&#x8BF7;&#x6C42;&#x6210;&#x529F;&#x5B8C;&#x6210;&#xFF08;&#x6CA1;&#x6709;&#x9519;&#x8BEF;&#xFF09;&#x5219;&#x7ED3;&#x675F;&#x7194;&#x65AD;&#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x518D;&#x6B21;&#x88AB;&#x7194;&#x65AD;&#x3002;</li>
</ul>
</li>
</ul>
<ul>
<li><p>&#x6162;&#x8C03;&#x7528;&#x6BD4;&#x4F8B;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h5avt2roq5j20iz0a2dgd.jpg" alt=""></p>
<p>| &#x5C5E;&#x6027;       | &#x8BF4;&#x660E;                                         |
| ---------- | -------------------------------------------- |
| &#x6700;&#x5927;RT     | &#x9700;&#x8981;&#x8BBE;&#x7F6E;&#x7684;&#x9608;&#x503C;&#xFF0C;&#x8D85;&#x8FC7;&#x8BE5;&#x503C;&#x5219;&#x4E3A;&#x6162;&#x8C03;&#x7528;           |
| &#x6BD4;&#x4F8B;&#x9608;&#x503C;   | &#x6162;&#x8C03;&#x7528;&#x5360;&#x6240;&#x6709;&#x8C03;&#x7528;&#x7684;&#x6BD4;&#x4F8B;&#xFF0C;&#x53D6;&#x503C;&#x8303;&#x56F4; [0,1]       |
| &#x7194;&#x65AD;&#x65F6;&#x957F;   | &#x5728;&#x8FD9;&#x6BB5;&#x65F6;&#x95F4;&#x5185;&#x53D1;&#x751F;&#x7194;&#x65AD;&#x3001;&#x62D2;&#x7EDD;&#x6240;&#x6709;&#x7684;&#x8BF7;&#x6C42;         |
| &#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570; | &#x5373;&#x5141;&#x8BB8;&#x901A;&#x8FC7;&#x7684;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;&#xFF0C;&#x5728;&#x8BE5;&#x6570;&#x91CF;&#x5185;&#x4E0D;&#x53D1;&#x751F;&#x7194;&#x65AD; |</p>
<p><strong>&#x8BF7;&#x6C42;&#x6570;&#x5927;&#x4E8E;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;&#x5E76;&#x4E14;&#x6162;&#x8C03;&#x7528;&#x7684;&#x6BD4;&#x7387;&#x5927;&#x4E8E;&#x6BD4;&#x4F8B;&#x9608;&#x503C;&#x5219;&#x53D1;&#x751F;&#x7194;&#x65AD;</strong>&#xFF0C;&#x7194;&#x65AD;&#x65F6;&#x957F;&#x4E3A;&#x7528;&#x6237;&#x81EA;&#x5B9A;&#x4E49;&#x8BBE;&#x7F6E;&#x3002;</p>
<p>&#x6CE8;&#x610F;Sentinel&#x9ED8;&#x8BA4;&#x7EDF;&#x8BA1;&#x7684;RT&#x4E0A;&#x9650;&#x662F;4900ms&#xFF0C;&#x8D85;&#x51FA;&#x6B64;&#x9608;&#x503C;&#x7684;&#x90FD;&#x4F1A;&#x7B97;&#x4F5C;4900ms&#xFF0C;&#x82E5;&#x9700;&#x8981;&#x53D8;&#x66F4;&#x6B64;&#x4E0A;&#x9650;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x542F;&#x52A8;&#x914D;&#x7F6E;&#x9879;-Dcsp.sentinel.statistic.max.rt=xxx&#x6765;&#x914D;&#x7F6E;&#x3002;</p>
</li>
</ul>
<ul>
<li><p>&#x5F02;&#x5E38;&#x6BD4;&#x4F8B;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h5c2pek26kj20ir0a9aal.jpg" alt=""></p>
<p>&#x5F53;&#x8D44;&#x6E90;&#x7684;&#x6BCF;&#x79D2;&#x8BF7;&#x6C42;&#x6570;&#x5927;&#x4E8E;&#x7B49;&#x4E8E;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;&#xFF0C;&#x5E76;&#x4E14;&#x5F02;&#x5E38;&#x603B;&#x6570;&#x5360;&#x901A;&#x8FC7;&#x91CF;&#x7684;&#x6BD4;&#x4F8B;&#x8D85;&#x8FC7;&#x6BD4;&#x4F8B;&#x9608;&#x503C;&#x65F6;&#xFF0C;&#x8D44;&#x6E90;&#x8FDB;&#x5165;&#x964D;&#x7EA7;&#x72B6;&#x6001;&#x3002;</p>
<p>| &#x5C5E;&#x6027;         | &#x8BF4;&#x660E;                                                 |
| ------------ | ---------------------------------------------------- |
| &#x5F02;&#x5E38;&#x6BD4;&#x4F8B;&#x9608;&#x503C; | &#x5F02;&#x5E38;&#x6BD4;&#x4F8B;=&#x53D1;&#x751F;&#x5F02;&#x5E38;&#x7684;&#x8BF7;&#x6C42;&#x6570;/&#x8BF7;&#x6C42;&#x603B;&#x6570;&#xFF08;&#x53D6;&#x503C;&#x8303;&#x56F4; [0,1]&#xFF09; |
| &#x7194;&#x65AD;&#x65F6;&#x957F;     | &#x5728;&#x8FD9;&#x6BB5;&#x65F6;&#x95F4;&#x53D1;&#x751F;&#x7194;&#x65AD;&#x3001;&#x62D2;&#x7EDD;&#x6240;&#x6709;&#x8BF7;&#x6C42;                     |
| &#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;   | &#x5373;&#x5141;&#x8BB8;&#x901A;&#x8FC7;&#x7684;&#x6700;&#x5C0F;&#x8BF7;&#x6C42;&#x6570;&#xFF0C;&#x5728;&#x8BE5;&#x6570;&#x91CF;&#x5185;&#x4E0D;&#x53D1;&#x751F;&#x7194;&#x65AD;         |</p>
</li>
</ul>
<ul>
<li><p>&#x5F02;&#x5E38;&#x6570;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h5c3re55cjj20io09ygm3.jpg" alt=""></p>
<p>&#x901A;&#x8FC7;&#x8BA1;&#x7B97;&#x53D1;&#x751F;&#x7684;&#x5F02;&#x5E38;&#x8BF7;&#x6C42;&#x6570;&#x4E0E;&#x9608;&#x503C;&#x5BF9;&#x6BD4;&#x7684;&#x7B56;&#x7565;</p>
<p>&#x5F53;&#x8D44;&#x6E90;&#x8FD1;1&#x5206;&#x949F;&#x7684;&#x5F02;&#x5E38;&#x6570;&#x76EE;&#x8D85;&#x8FC7;&#x9608;&#x503C;(&#x5F02;&#x5E38;&#x6570;)&#x4E4B;&#x540E;&#x4F1A;&#x8FDB;&#x884C;&#x670D;&#x52A1;&#x964D;&#x7EA7;&#x3002;&#x26A0;&#xFE0F; &#x7531;&#x4E8E;&#x7EDF;&#x8BA1;&#x65F6;&#x95F4;&#x662F;&#x5206;&#x949F;&#x7EA7;&#x522B;&#x7684;&#xFF0C;&#x82E5;&#x7194;&#x65AD;&#x65F6;&#x957F;&#x5C0F;&#x4E8E;60s&#xFF0C;&#x5219;&#x7ED3;&#x675F;&#x7194;&#x65AD;&#x72B6;&#x6001;&#x540E;&#x4ECD;&#x53EF;&#x80FD;&#x518D;&#x6B21;&#x8FDB;&#x5165;&#x7194;&#x65AD;&#x3002;</p>
</li>
</ul>
<h2 id="6&#x70ED;&#x70B9;&#x9650;&#x6D41;"><a name="6&#x70ED;&#x70B9;&#x9650;&#x6D41;" class="plugin-anchor" href="#6&#x70ED;&#x70B9;&#x9650;&#x6D41;"><i class="fa fa-link" aria-hidden="true"></i></a>6.&#x70ED;&#x70B9;&#x9650;&#x6D41;</h2>
<p>&#x4F55;&#x4E3A;&#x70ED;&#x70B9;&#xFF1F;&#x70ED;&#x70B9;&#x5373;&#x7ECF;&#x5E38;&#x8BBF;&#x95EE;&#x7684;&#x6570;&#x636E;&#x3002;&#x5F88;&#x591A;&#x65F6;&#x5019;&#x6211;&#x4EEC;&#x5E0C;&#x671B;&#x7EDF;&#x8BA1;&#x67D0;&#x4E2A;&#x70ED;&#x70B9;&#x6570;&#x636E;&#x4E2D;&#x8BBF;&#x95EE;&#x9891;&#x6B21;&#x6700;&#x9AD8;&#x7684; Top K &#x6570;&#x636E;&#xFF0C;&#x5E76;&#x5BF9;&#x5176;&#x8BBF;&#x95EE;&#x8FDB;&#x884C;&#x9650;&#x5236;&#x3002;&#x6BD4;&#x5982;&#xFF1A;</p>
<ul>
<li>&#x5546;&#x54C1; ID &#x4E3A;&#x53C2;&#x6570;&#xFF0C;&#x7EDF;&#x8BA1;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#x5185;&#x6700;&#x5E38;&#x8D2D;&#x4E70;&#x7684;&#x5546;&#x54C1; ID &#x5E76;&#x8FDB;&#x884C;&#x9650;&#x5236;</li>
<li>&#x7528;&#x6237; ID &#x4E3A;&#x53C2;&#x6570;&#xFF0C;&#x9488;&#x5BF9;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#x5185;&#x9891;&#x7E41;&#x8BBF;&#x95EE;&#x7684;&#x7528;&#x6237; ID &#x8FDB;&#x884C;&#x9650;&#x5236;</li>
</ul>
<p>&#x70ED;&#x70B9;&#x53C2;&#x6570;&#x9650;&#x6D41;&#x4F1A;&#x7EDF;&#x8BA1;&#x4F20;&#x5165;&#x53C2;&#x6570;&#x4E2D;&#x7684;&#x70ED;&#x70B9;&#x53C2;&#x6570;&#xFF0C;&#x5E76;&#x6839;&#x636E;&#x914D;&#x7F6E;&#x7684;&#x9650;&#x6D41;&#x9608;&#x503C;&#x4E0E;&#x6A21;&#x5F0F;&#xFF0C;&#x5BF9;&#x5305;&#x542B;&#x70ED;&#x70B9;&#x53C2;&#x6570;&#x7684;&#x8D44;&#x6E90;&#x8C03;&#x7528;&#x8FDB;&#x884C;&#x9650;&#x6D41;&#x3002;&#x70ED;&#x70B9;&#x53C2;&#x6570;&#x9650;&#x6D41;&#x53EF;&#x4EE5;&#x770B;&#x505A;&#x662F;&#x4E00;&#x79CD;&#x7279;&#x6B8A;&#x7684;&#x6D41;&#x91CF;&#x63A7;&#x5236;&#xFF0C;&#x4EC5;&#x5BF9;&#x5305;&#x542B;&#x70ED;&#x70B9;&#x53C2;&#x6570;&#x7684;&#x8D44;&#x6E90;&#x8C03;&#x7528;&#x751F;&#x6548;&#x3002;</p>
<p>Sentinel &#x5229;&#x7528; LRU &#x7B56;&#x7565;&#x7EDF;&#x8BA1;&#x6700;&#x8FD1;&#x6700;&#x5E38;&#x8BBF;&#x95EE;&#x7684;&#x70ED;&#x70B9;&#x53C2;&#x6570;&#xFF0C;&#x7ED3;&#x5408;&#x4EE4;&#x724C;&#x6876;&#x7B97;&#x6CD5;&#x6765;&#x8FDB;&#x884C;&#x53C2;&#x6570;&#x7EA7;&#x522B;&#x7684;&#x6D41;&#x63A7;&#x3002;&#x70ED;&#x70B9;&#x53C2;&#x6570;&#x9650;&#x6D41;&#x652F;&#x6301;&#x96C6;&#x7FA4;&#x6A21;&#x5F0F;&#x3002;</p>
<p><img src="https://tva1.sinaimg.cn/large/e6c9d24ely1h5c5tak867j20ix0c4gm4.jpg" alt=""></p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; mine 2022-2025 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2022-08-19 16:34:28
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="17.注册中心&配置中心-nacos.html" class="navigation navigation-prev " aria-label="Previous page: 注册中心&配置中心-nacos">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../java高级/JUC.html" class="navigation navigation-next " aria-label="Next page: 神秘的JUC包">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"限流-sentinel","level":"4.1.17","depth":2,"next":{"title":"神秘的JUC包","level":"4.2","depth":1,"path":"java高级/JUC.md","ref":"java高级/JUC.md","articles":[]},"previous":{"title":"注册中心&配置中心-nacos","level":"4.1.16","depth":2,"path":"springcloud/17.注册中心&配置中心-nacos.md","ref":"springcloud/17.注册中心&配置中心-nacos.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["back-to-top-button","code","splitter","expandable-chapters-small","anchors","theme-comscore","tbfed-pagefooter","sidebar-style","pageview-count","popup"],"pluginsConfig":{"sidebar-style":{"author":"梁兴龙","title":"《Java 笔记本》"},"tbfed-pagefooter":{"copyright":"Copyright &copy mine 2022-2025","modify_label":"文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"splitter":{},"search":{},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-comscore":{},"back-to-top-button":{},"pageview-count":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"springcloud/18.限流-sentinel.md","mtime":"2022-08-19T08:34:28.615Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-08-22T03:22:22.085Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sidebar-style/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

